FROM ubuntu:16.04
MAINTAINER Li Jian
ENV REFRESHED_AT 2017-12-28

ADD sources.list /etc/apt/sources.list
RUN apt -y update && \
    apt -y install iputils-ping net-tools curl wget telnet && \
    apt -y install ruby ruby-dev build-essential
RUN gem install --no-ri --no-rdoc json

RUN mkdir -p /opt/distributed_client
ADD client.rb /opt/distributed_client

WORKDIR /opt/distributed_client

ENTRYPOINT ["ruby", "/opt/distributed_client/client.rb"]

